/* Copyright (c) 2014 - 2024 Qualcomm Technologies International, Ltd. */
/* %%version */

/*
FILE NAME
    gatt_device_info_server_debug.h

DESCRIPTION
    Header file for the GATT Device Information Server library debug functionality.
*/
#ifndef GATT_DEVICE_INFO_SERVER_DEBUG_H_
#define GATT_DEVICE_INFO_SERVER_DEBUG_H_

#include <stdio.h>
#include "csr_bt_panic.h"

/* Enable the macro to enable debug logs */
/*#define GATT_DEVICE_INFO_DEBUG_LIB*/

/* Macro used to generate debug version of this library */
#ifdef GATT_DEVICE_INFO_DEBUG_LIB

#ifndef DEBUG_PRINT_ENABLED
#define DEBUG_PRINT_ENABLED
#endif

#define PRINT(x) printf x

#define GATT_DEVICE_INFO_SERVER_DEBUG_INFO(x) {PRINT(("%s:%d - ", __FILE__, __LINE__)); PRINT(x);}
#define GATT_DEVICE_INFO_SERVER_DEBUG_PANIC(x) {GATT_DEVICE_INFO_SERVER_DEBUG_INFO(x); CsrPanic(CSR_TECH_BT, CSR_BT_PANIC_MYSTERY, "x");}
#define GATT_DEVICE_INFO_SERVER_PANIC(x) {GATT_DEVICE_INFO_SERVER_DEBUG_INFO(x); CsrPanic(CSR_TECH_BT, CSR_BT_PANIC_MYSTERY, "x");}


#else /* GATT_DEVICE_INFO_DEBUG_LIB */


#define GATT_DEVICE_INFO_SERVER_DEBUG_INFO(x)
#define GATT_DEVICE_INFO_SERVER_DEBUG_PANIC(x)
#define GATT_DEVICE_INFO_SERVER_PANIC(x) {CsrPanic(CSR_TECH_BT, CSR_BT_PANIC_MYSTERY, "x");}

#endif /* GATT_DEVICE_INFO_DEBUG_LIB */

#endif /* GATT_DEVICE_INFO_SERVER_DEBUG_H_ */
